home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / clipper / nftroff.zip / 3.tr < prev    next >
Text File  |  1991-11-21  |  32KB  |  1,833 lines

  1. .de }n
  2. .bp
  3. .sp .5i
  4. ..
  5. .wh -.8i }n
  6. .sp .5i
  7. .po -.4i
  8. .ll 7.5i
  9. .ps 9
  10. .vs 9
  11. .in 0i
  12. .ta 1.63265i
  13. .sp 2
  14. .ne 20
  15. .ps +3
  16. .vs +3
  17. FT_CHDIR()    Change the current directory
  18. .br
  19. .ta
  20. .in 0.08i
  21. .ps -3
  22. .vs -3
  23. .sp 2
  24. \fBFT_CHDIR()
  25. Change the current directory
  26. .in 0i
  27. .br
  28. \l'6.24i'
  29. .br
  30. .sp
  31. .in 0.08i
  32. \fBSyntax
  33. .sp
  34. .in 0.4i
  35. \fBFT_CHDIR( <cDirName> ) -> nResult
  36. .sp
  37. .in 0.08i
  38. \fBArguments
  39. .sp
  40. .in 0.4i
  41. \fB<cDirName>\fR is the name of the desired directory\.
  42. .sp
  43. .in 0.08i
  44. \fBReturns
  45. .sp
  46. .in 0.4i
  47. .ta 0.24i
  48. 0    if successful
  49. .br
  50. .ta
  51. .ta 0.24i
  52. 3    if path not found
  53. .br
  54. .ta
  55. 99 if invalid parameters passed
  56. .sp
  57. .in 0.08i
  58. \fBDescription
  59. .sp
  60. .in 0.4i
  61. Use this function if you prefer to change the active directory
  62. instead of relying on the SET PATH command\.
  63. .sp
  64. The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
  65. To use another assembler, you will need to rearrange the PROC and
  66. SEGMENT directives, and also the ENDP and ENDS directives (a very
  67. minor task)\.
  68. .sp
  69. .in 0.08i
  70. \fBExamples
  71. .sp
  72. .in 0.4i
  73. .br
  74. FT_CHDIR( "C:\\CLIPPER" )
  75. .br
  76. FT_CHDIR( "\\" )
  77. .br
  78. FT_CHDIR( "\.\.\\SOURCE" )
  79. .sp
  80. .in 0.08i
  81. \fBSource:\fR CHDIR\.ASM
  82. .sp
  83. \fBAuthor:\fR Ted Means
  84. .in 0i
  85. .ta 1.63265i
  86. .sp 2
  87. .ne 20
  88. .ps +3
  89. .vs +3
  90. FT_DEFAULT()    Retrieve and optionally change the current default drive
  91. .br
  92. .ta
  93. .in 0.08i
  94. .ps -3
  95. .vs -3
  96. .sp 2
  97. \fBFT_DEFAULT()
  98. Retrieve and optionally change the current default drive
  99. .in 0i
  100. .br
  101. \l'6.24i'
  102. .br
  103. .sp
  104. .in 0.08i
  105. \fBSyntax
  106. .sp
  107. .in 0.4i
  108. \fBFT_DEFAULT( [ <cDrive> ] ) -> cDrive
  109. .sp
  110. .in 0.08i
  111. \fBArguments
  112. .sp
  113. .in 0.4i
  114. \fB<cDrive>\fR is optional, and if specified is the new default drive\.
  115. .sp
  116. .in 0.08i
  117. \fBReturns
  118. .sp
  119. .in 0.4i
  120. The current default drive\.  If a change of default drive is requested,
  121. the return value is the drive AFTER the change is made\.  This allows
  122. you to make sure you specified a valid drive (i\.e\. if you attempt to
  123. change the default drive, and the function returns a different drive
  124. letter than the one you specified, then the drive does not exist)\.
  125. .sp
  126. .in 0.08i
  127. \fBDescription
  128. .sp
  129. .in 0.4i
  130. Useful any time you need to know or change the default drive\.
  131. .sp
  132. The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
  133. To use another assembler, you will need to rearrange the PROC and
  134. SEGMENT directives, and also the ENDP and ENDS directives (a very
  135. minor task)\.
  136. .sp
  137. .in 0.08i
  138. \fBExamples
  139. .sp
  140. .in 0.4i
  141. .ta 1.92i
  142. cDrive := FT_DEFAULT()    && Get the current drive
  143. .br
  144. .ta
  145. .ta 1.92i
  146. FT_DEFAULT("C")    && Switch to drive C
  147. .br
  148. .ta
  149. .sp
  150. IF FT_DEFAULT("E") != "E"
  151. .in 0.64i
  152. Qout( "Drive E does not exist!" )
  153. .in 0.4i
  154. ENDIF
  155. .sp
  156. .in 0.08i
  157. \fBSource:\fR DEFAULT\.ASM
  158. .sp
  159. \fBAuthor:\fR Ted Means
  160. .in 0i
  161. .ta 1.63265i
  162. .sp 2
  163. .ne 20
  164. .ps +3
  165. .vs +3
  166. FT_DOSVER    Return the current DOS major and minor version as a string
  167. .br
  168. .ta
  169. .in 0.08i
  170. .ps -3
  171. .vs -3
  172. .sp 2
  173. \fBFT_DOSVER
  174. Return the current DOS major and minor version as a string
  175. .in 0i
  176. .br
  177. \l'6.24i'
  178. .br
  179. .sp
  180. .in 0.08i
  181. \fBSyntax
  182. .sp
  183. .in 0.4i
  184. \fBFT_DOSVER() -> <cVersion>
  185. .sp
  186. .in 0.08i
  187. \fBArguments
  188. .sp
  189. .in 0.4i
  190. None
  191. .sp
  192. .in 0.08i
  193. \fBReturns
  194. .sp
  195. .in 0.4i
  196. A character string with the major version number first, a
  197. period ("\."), then the minor version number (e\.g\., "3\.30")
  198. .sp
  199. .in 0.08i
  200. \fBDescription
  201. .sp
  202. .sp
  203. .in 0.4i
  204. FT_DOSVER() invokes DOS interrupt 21h, service 30 in order to
  205. return the current DOS version\.  It does this by setting up
  206. an array corresponding to machine registers and then calling
  207. the toolkit function FT_INT86()\.
  208. .sp
  209. It returns a character string corresponding to the DOS
  210. version, as follows:  The major version, a period ("\."), then
  211. the minor version\.
  212. .sp
  213. .sp
  214. .sp
  215. .in 0.08i
  216. \fBExamples
  217. .sp
  218. .sp
  219. .in 0.48i
  220. .br
  221. FUNCTION main()
  222. .br
  223. RETURN QOut( "Dos version: " + FT_DOSVER() )
  224. .sp
  225. .sp
  226. .in 0.08i
  227. \fBSource:\fR DOSVER\.PRG
  228. .sp
  229. \fBAuthor:\fR Glenn Scott
  230. .in 0i
  231. .ta 1.63265i
  232. .sp 2
  233. .ne 20
  234. .ps +3
  235. .vs +3
  236. FT_DSKFREE()    Return the amount of available disk space
  237. .br
  238. .ta
  239. .in 0.08i
  240. .ps -3
  241. .vs -3
  242. .sp 2
  243. \fBFT_DSKFREE()
  244. Return the amount of available disk space
  245. .in 0i
  246. .br
  247. \l'6.24i'
  248. .br
  249. .sp
  250. .in 0.08i
  251. \fBSyntax
  252. .sp
  253. .in 0.4i
  254. \fBFT_DSKFREE( [ <cDrive> ] ) -> nSpaceAvail
  255. .sp
  256. .in 0.08i
  257. \fBArguments
  258. .sp
  259. .in 0.4i
  260. \fB<cDrive>\fR is the fixed disk to query\. If no parameter is passed
  261. the operation will be performed on the default drive\.  Do not
  262. include the ":"\.
  263. .sp
  264. .in 0.08i
  265. \fBReturns
  266. .sp
  267. .in 0.4i
  268. Integer representing the available disk space in bytes\.
  269. .sp
  270. .in 0.08i
  271. \fBDescription
  272. .sp
  273. .in 0.4i
  274. Function to return the available space on the passed
  275. drive letter or the default drive if no drive is passed\.
  276. .sp
  277. Uses FT_INT86() through the internal function _ftDiskInfo()\.
  278. .sp
  279. .in 0.08i
  280. \fBExamples
  281. .sp
  282. .in 0.4i
  283. .ta 1.28i
  284. ? FT_DSKFREE()    // Returns free space on default drive\.
  285. .br
  286. .ta
  287. .sp
  288. .in 0.08i
  289. \fBSource:\fR DISKFUNC\.PRG
  290. .sp
  291. \fBAuthor:\fR Robert A\. DiFalco
  292. .in 0i
  293. .ta 1.63265i
  294. .sp 2
  295. .ne 20
  296. .ps +3
  297. .vs +3
  298. FT_DSKSIZE()    Return the maximum capacity of a fixed disk
  299. .br
  300. .ta
  301. .in 0.08i
  302. .ps -3
  303. .vs -3
  304. .sp 2
  305. \fBFT_DSKSIZE()
  306. Return the maximum capacity of a fixed disk
  307. .in 0i
  308. .br
  309. \l'6.24i'
  310. .br
  311. .sp
  312. .in 0.08i
  313. \fBSyntax
  314. .sp
  315. .in 0.4i
  316. \fBFT_DSKSIZE( [ <cDrive> ] ) -> nMaxCapacity
  317. .sp
  318. .in 0.08i
  319. \fBArguments
  320. .sp
  321. .in 0.4i
  322. \fB<cDrive>\fR is the fixed disk to query\. If no drive is sent, the
  323. operation will be performed on the default drive\. Send without
  324. the ":"\.
  325. .sp
  326. .in 0.08i
  327. \fBReturns
  328. .sp
  329. .in 0.4i
  330. An integer representing the maximum disk capacity in bytes\.
  331. .sp
  332. .in 0.08i
  333. \fBDescription
  334. .sp
  335. .in 0.4i
  336. Function utilizing FT_INT86() to return Maximum Disk Size\.
  337. Uses FT_INT86() through the internal function _ftDiskInfo()\.
  338. .sp
  339. .in 0.08i
  340. \fBExamples
  341. .sp
  342. .in 0.4i
  343. .ta 1.6i
  344. .br
  345. ? FT_DSKSIZE()    // Maximum capacity for default drive
  346. .br
  347. .ta
  348. .br
  349. ? FT_DSKSIZE( "D" ) // Maximum capacity for Drive D:
  350. .sp
  351. .in 0.08i
  352. \fBSource:\fR DISKFUNC\.PRG
  353. .sp
  354. \fBAuthor:\fR Robert A\. DiFalco
  355. .in 0i
  356. .ta 1.63265i
  357. .sp 2
  358. .ne 20
  359. .ps +3
  360. .vs +3
  361. FT_FLOPTST()    Test diskette drive status
  362. .br
  363. .ta
  364. .in 0.08i
  365. .ps -3
  366. .vs -3
  367. .sp 2
  368. \fBFT_FLOPTST()
  369. Test diskette drive status
  370. .in 0i
  371. .br
  372. \l'6.24i'
  373. .br
  374. .sp
  375. .in 0.08i
  376. \fBSyntax
  377. .sp
  378. .in 0.48i
  379. \fBFT_FLOPTST( <nDrive> ) -> nStatus
  380. .sp
  381. .in 0.08i
  382. \fBArguments
  383. .sp
  384. .in 0.48i
  385. \fB<nDrive>\fR is the diskette drive number, 0 = A:, 1 = B:
  386. .sp
  387. .in 0.08i
  388. \fBReturns
  389. .sp
  390. .in 0.48i
  391. .br
  392. -1 - Wrong Parameters
  393. .in 0.56i
  394. .br
  395. 0 - Drive Loaded and ready to read or write
  396. .br
  397. 1 - Drive Door Open or Diskette inserted upside down
  398. .br
  399. 2 - Diskette is unformatted
  400. .br
  401. 3 - Write protected
  402. .br
  403. 4 - Undetermined
  404. .sp
  405. .in 0.08i
  406. \fBDescription
  407. .sp
  408. .in 0.48i
  409. FT_FLOPTST() is designed as a full replacement for ISDRIVE()\.  Where
  410. ISDRIVE() returns just \.T\. or \.F\. depending if the diskette drive is
  411. ready or not, FT_FLOPTST() returns a numeric code designating the
  412. diskette drive\'s status\.
  413. .sp
  414. FT_FLOPTST() is particularly useful in backup and restore programs
  415. that need to test the floppy drive before writing/reading from a
  416. floppy disk\.
  417. .sp
  418. .in 0.08i
  419. \fBExamples
  420. .sp
  421. .in 0.48i
  422. .br
  423. iStatus := FT_FLOPTST( 1 )
  424. .sp
  425. .br
  426. DO CASE
  427. .in 0.72i
  428. .br
  429. CASE iStatus == 1
  430. .in 0.96i
  431. .br
  432. Qout( "The door to drive A is open\." )
  433. .in 0.72i
  434. .br
  435. CASE iStatus == 2
  436. .in 0.96i
  437. .br
  438. Qout( "The diskette in drive A is not formatted\." )
  439. .in 0.72i
  440. .br
  441. CASE iStatus == 3
  442. .in 0.96i
  443. .br
  444. Qout( "The diskette in drive A is write-protected\." )
  445. .in 0.72i
  446. .br
  447. CASE iStatus == 4
  448. .in 0.96i
  449. .br
  450. Qout( "Something is wrong with drive A, but I don\'t know what\." )
  451. .in 0.48i
  452. .br
  453. ENDCASE
  454. .sp
  455. .in 0.08i
  456. \fBSource:\fR FLOPTST\.ASM
  457. .sp
  458. \fBAuthor:\fR Joseph LaCour
  459. .in 0i
  460. .ta 1.63265i
  461. .sp 2
  462. .ne 20
  463. .ps +3
  464. .vs +3
  465. FT_HANDCNT()    Count number of available DOS (not network) file handles
  466. .br
  467. .ta
  468. .in 0.08i
  469. .ps -3
  470. .vs -3
  471. .sp 2
  472. \fBFT_HANDCNT()
  473. Count number of available DOS (not network) file handles
  474. .in 0i
  475. .br
  476. \l'6.24i'
  477. .br
  478. .sp
  479. .in 0.08i
  480. \fBSyntax
  481. .sp
  482. .in 0.32i
  483. \fBFT_HANDCNT() -> nHandles
  484. .sp
  485. .in 0.08i
  486. \fBArguments
  487. .sp
  488. .in 0.32i
  489. None
  490. .sp
  491. .in 0.08i
  492. \fBReturns
  493. .sp
  494. .in 0.32i
  495. numeric, long integer
  496. .sp
  497. .in 0.08i
  498. \fBDescription
  499. .sp
  500. .in 0.32i
  501. FT_HANDCNT() finds the internal DOS Device Control Blocks used for
  502. storing file information and counts the number of DCB entries\.  The
  503. DCB is set up by reading the FILES= line in CONFIG\.SYS, and there
  504. is one DCB entry for each file handle\.
  505. .sp
  506. NOTE: For Novell networks, the number of network file handles is
  507. .in 0.8i
  508. controlled by SHELL\.CFG